#!/bin/bash -e

prj=$1

# get list
#curl -X GET -d "simple=true" --header "PRIVATE-TOKEN: <your token here>" "http://192.168.0.11/api/v4/users/hitmoon/projects"

# delete
# curl -X DELETE  --header "PRIVATE-TOKEN: <your token here>" "http://192.168.0.11/api/v4/projects/${prj}"

# create without group
curl -X POST  --header "PRIVATE-TOKEN: <your token here>" \
              -d "name=${prj}" --url "http://192.168.0.11/api/v4/projects"

# create with group
# curl -X POST  --header "PRIVATE-TOKEN: <your token here>" \
#              -d "name=${prj}&namespace_id=48" --url "http://192.168.0.11/api/v4/projects"
